/**
 * 
 * Object containing line of parsed html
 * Can be either a text line or closing tag dependent on 'close' flag
 *  
 * 
 * @author tomalteman
 *
 */
public class pageLine {
	private String tag;
	//1 for close tag - 2 for open
	private int close;
	private int depth;
	private String data;
	
	public pageLine()
	{
		tag = "";
		close = 0;
		depth = 0;
		data = "";
	}
	
	public pageLine(String t, int c, int d, String dat)
	{
		tag = t;
		close = c;
		depth = d;
		data = dat;
	}
	
	public pageLine(String t, int d)
	{
		tag = t;
		close = 1;
		depth = d;
		data="";
	}
	
	public pageLine(String t, int c,int d)
	{
		tag = t;
		close = c;
		depth = d;
		data="";
	}
	
	/**
	 * Print out pageLine
	 */
	public void print()
	{
		//If close tag
		if(close==1) System.out.println("/" + tag + " " + depth);
		//If text
		else System.out.println("<"+tag+" "+ depth+ " > " + data);
	}
	
	/**
	 * tag Retrieval
	 */
	public String getTag()
	{
		return tag;
	}
	
	/**
	 * tag Setting
	 */
	public void setTag(String s)
	{
		tag = s;
	}
	
	/**
	 * Data Retrieval
	 */
	public String getData()
	{
		return data;
	}
	
	/**
	 * Data Setting
	 */
	public void setData(String s)
	{
		data = s;
	}
	
	/**
	 * Close Retrieval
	 */
	public int getClose()
	{
		return close;
	}
	
	/**
	 * Close Setting
	 */
	public void setClose(int s)
	{
		close = s;
	}
	
	/**
	 * Depth Retrieval
	 */
	public int getDepth()
	{
		return depth;
	}
	
	/**
	 * Depth Setting
	 */
	public void setDepth(int s)
	{
		depth = s;
	}
	
}
